<script setup>
import { onMounted, nextTick, ref, reactive, watch } from 'vue'
import axios from 'axios';

const uploadRef = ref(null)
const submitUpload = () => {
  uploadRef.value.submit()
}
</script>

<template>
  <el-upload ref="uploadRef" class="upload-demo" action="/api/upload" :auto-upload="false" multiple>
    <template #trigger>
      <button>选择文件</button>
    </template>
    <button class="upBtn" @click="submitUpload">上传文件</button>
  </el-upload>
</template>

<style lang='less'>
.upBtn {
  background-color: rgb(66, 150, 80);
  color: aliceblue;

  &:hover {
    border-color: rgb(237, 4, 19) !important;
  }
}
</style>